package atguigu.zifuchuan;

public class TestDemo {

	public static void main(String[] args) {

//		test2();

		test3();
	}

	public static void test3(){

//		List<String> infoList = new ArrayList<String>();
//		infoList.add("字段没有填");
//		infoList.add("异常");
//
//		String msg = MessageFormat.format("异常单{0}异常描述没有填写！", infoList.toString());
//
//		System.out.println(msg);

		String str = " - 6 ";
		str = str.trim();
		System.out.println(str);
		str = str.replaceAll(" ","");
		System.out.println(str);
		Double aDouble = Double.valueOf(str);
		System.out.println(aDouble);
	}



	public static void test2() {

		String str = "2345H#";
		String str2 = str.replaceAll("[a-zA-Z#]", "");
		System.out.println(str2);
	}

	public static void test1() {
		String consigner = "邓春程(ex_dengcc1)";
		int stIndex = consigner.indexOf("(");
		int edIndex = consigner.indexOf(")");
		String name = consigner.substring(stIndex + 1, edIndex);

		System.out.println(name);
	}
}
